from time import sleep

from apscheduler.schedulers.background import BackgroundScheduler
from flask import Flask


def cron_his_data():
    print("hello word")

# 创建scheduler实例
scheduler = BackgroundScheduler()
# 添加定时任务
scheduler.add_job(cron_his_data, 'cron', hour=14, minute=20)
# 启动scheduler
scheduler.start()

app = Flask(__name__)

if __name__ == '__main__':
    app.run(port=5601, debug=True)
